The TGL exporter is used to produce string database files from Microsoft Word 2000 documents. These string databases are essentially a lookup table -- given a particular string ID, you can find a wide-character string in the database. To support different languages in Bridge Commander, you simply need to export different TGL files for each language.
To install, place the tgl.dot file (located in Tools\TglWordExport) into the Startup folder for Microsoft Office (usually something like \Program Files\Microsoft Office\Office\Startup). When you start Word, you should see a new option in the File menu, Export TGL....
If you open the tgl.dot file as a document, you'll see that it contains its own documentation. Basically, you need to have a table in your Word document, with at least two columns, titled "String Name" and "String Data". The string name is the key in the database, and the string data is the associated string.
Optional columns include "Speaker" (used to automatically prepend the name of the speaker for subtitled voice lines), and "File Name" (an associated .wav or .mp3 file -- used for dialogue). You can also add other columns to correspond to different languages -- when you go to export the file, you can select columns other than String Data to use as your data.
When you go to export a TGL, you'll be presented with some options. Output File is the file name for the TGL you're saving. Media Path is the prefix to be applied to all file names (i.e. sfx\Maelstrom\Episode 1). Data Column is the column containing the string data you want to export -- if you have multiple languages, then put the appropriate column here. Include Speaker Prefix is whether you want the line to include the speaker name. This should no longer be necessary in the game. Speaker Prefix Separator is what to put after the speaker's name. Finally, Default Media Extension is the extension to use if one is not supplied in the file name.
Note: You definitely want to turn off Word's auto-text and auto-correction features when working with TGLs. Smart quotes and other substitutions usually show up as box characters in the game, as opposed to quotes or whatever.
To get localized strings in the game, you need to load the localization database, then query it for the string ID you want. It will return a TGString (basically, a wide-character string). For example, you could do something like this:
# Load the database. pDatabase = App.g_kLocalizationManager.Load("data/TGL/MyDatabase.tgl") # Retrieve the string with ID "foo". kString = pDatabase.GetString("foo") # Now, print the string. print kString.GetCString() # Finally, unload the database. App.g_kLocalizationManager.Unload(pDatabase)
Created on ... February 01, 2002